<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qclplatform.cpp -->
  <title>QCLPlatform Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <script src="./scripts/superfish.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />  <script src="./scripts/narrow.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->
</head>
<body class="" onload="CheckEmptyAndLoadList();">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="150"><img src="images/qt-logo.png" align="left" border="0" />&nbsp;&nbsp;<img src="images/qtopencl-logo.png" border="0" /></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"> <a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="qtopencl-all-classes.html"><font color="#004faf">All Classes</font></a></td>
</table>              <li><a href="modules.html">Modules</a></li>              <li>QtCL</li>
              <li>QCLPlatform</li>
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QCLPlatform Class Reference</h1>
<!-- $$$QCLPlatform-brief -->
<p>The QCLPlatform class represents an OpenCL platform definition. <a href="#details">More...</a></p>
<!-- @@@QCLPlatform -->
<pre class="highlightedCode brush: cpp">    #include &lt;QCLPlatform&gt;</pre><p>This class was introduced in QtOpenCL 4.7.</p>
<ul>
<li><a href="qclplatform-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qclplatform.html#VersionFlag-enum">VersionFlag</a></b> { Version_1_0, Version_1_1 }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qclplatform.html#VersionFlag-enum">VersionFlags</a></b></td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qclplatform.html#QCLPlatform">QCLPlatform</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qclplatform.html#QCLPlatform-2">QCLPlatform</a></b> ( cl_platform_id <i>id</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qclplatform.html#extensionSuffix">extensionSuffix</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qclplatform.html#extensions">extensions</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qclplatform.html#hasExtension">hasExtension</a></b> ( const char * <i>name</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qclplatform.html#isEmbeddedProfile">isEmbeddedProfile</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qclplatform.html#isFullProfile">isFullProfile</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qclplatform.html#isNull">isNull</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qclplatform.html#name">name</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> cl_platform_id </td><td class="memItemRight bottomAlign"><b><a href="qclplatform.html#platformId">platformId</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qclplatform.html#profile">profile</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qclplatform.html#vendor">vendor</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qclplatform.html#version">version</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCLPlatform::VersionFlags </td><td class="memItemRight bottomAlign"><b><a href="qclplatform.html#versionFlags">versionFlags</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qclplatform.html#operator-not-eq">operator!=</a></b> ( const QCLPlatform &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qclplatform.html#operator-eq-eq">operator==</a></b> ( const QCLPlatform &amp; <i>other</i> ) const</td></tr>
</table>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QCLPlatform&gt; </td><td class="memItemRight bottomAlign"><b><a href="qclplatform.html#platforms">platforms</a></b> ()</td></tr>
</table>
<a name="details"></a>
<!-- $$$QCLPlatform-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QCLPlatform class represents an OpenCL platform definition.</p>
<p>An OpenCL platform consists of the host CPU plus one or more devices, and manages memory resources and executable kernels.</p>
<p>The <a href="qclplatform.html#platforms">platforms</a>() function can be used to obtain the list of OpenCL platforms that are accessible to the host. For each platform, <a href="qcldevice.html#devices">QCLDevice::devices</a>() can be used to enumerate the devices that are managed by the platform.</p>
<p>QCLPlatform functions can be used to query information about the platform:</p>
<ul>
<li><a href="qclplatform.html#profile">profile</a>() - describes the level of OpenCL support that is available; either <tt>FULL_PROFILE</tt> or <tt>EMBEDDED_PROFILE</tt>. The <a href="qclplatform.html#isFullProfile">isFullProfile</a>() and <a href="qclplatform.html#isEmbeddedProfile">isEmbeddedProfile</a>() convenience functions can be used to check for specific profile strings.</li>
<li><a href="qclplatform.html#version">version</a>() - version of OpenCL supported by the platform; usually something like <tt>OpenCL 1.0</tt>.</li>
<li><a href="qclplatform.html#versionFlags">versionFlags</a>() - flag bits indicating which versions of OpenCL are supported by this platform, in an easier to use form than the string from <a href="qclplatform.html#version">version</a>().</li>
<li><a href="qclplatform.html#name">name</a>() - name of the platform.</li>
<li><a href="qclplatform.html#vendor">vendor</a>() - name of the vendor that created the platform.</li>
<li><a href="qclplatform.html#extensionSuffix">extensionSuffix</a>() - the vendor extension suffix if the <tt>cl_khr_icd</tt> extension is supported; an empty string otherwise.</li>
<li><a href="qclplatform.html#extensions">extensions</a>() - list of OpenCL extensions that are supported by the platform. The <a href="qclplatform.html#hasExtension">hasExtension</a>() function can be used to check for a specific extension.</li>
</ul>
<p>The <a href="clinfo.html">clinfo</a> utility program can be used to dump all of the platforms that are supported by the system's OpenCL implementation.</p>
</div>
<p>See also <a href="qcldevice.html">QCLDevice</a>.</p>
<!-- @@@QCLPlatform -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$VersionFlag$$$Version_1_0$$$Version_1_1 -->
<h3 class="flags"><a name="VersionFlag-enum"></a>enum QCLPlatform::VersionFlag<br/>flags QCLPlatform::VersionFlags</h3>
<p>This enum defines flag bits corresponding to OpenCL versions.</p>
<table class="valuelist"><tr class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td  class="topAlign"><tt>QCLPlatform::Version_1_0</tt></td><td class=" topAlign"><tt>0x0001</tt></td><td  class="topAlign">OpenCL 1.0 is supported.</td></tr>
<tr><td  class="topAlign"><tt>QCLPlatform::Version_1_1</tt></td><td class=" topAlign"><tt>0x0002</tt></td><td  class="topAlign">OpenCL 1.1 is supported.</td></tr>
</table>
<p>The VersionFlags type is a typedef for <a href="qflags.html">QFlags</a>&lt;VersionFlag&gt;. It stores an OR combination of VersionFlag values.</p>
<!-- @@@VersionFlag -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QCLPlatform[overload1]$$$QCLPlatform -->
<h3 class="fn"><a name="QCLPlatform"></a>QCLPlatform::QCLPlatform ()</h3>
<p>Constructs a default OpenCL platform identifier.</p>
<!-- @@@QCLPlatform -->
<!-- $$$QCLPlatform$$$QCLPlatformcl_platform_id -->
<h3 class="fn"><a name="QCLPlatform-2"></a>QCLPlatform::QCLPlatform ( cl_platform_id <i>id</i> )</h3>
<p>Constructs an OpenCL platform identifier that corresponds to the native OpenCL value <i>id</i>.</p>
<!-- @@@QCLPlatform -->
<!-- $$$extensionSuffix[overload1]$$$extensionSuffix -->
<h3 class="fn"><a name="extensionSuffix"></a>QString QCLPlatform::extensionSuffix () const</h3>
<p>Returns the vendor extension suffix for this platform if the <tt>cl_khr_icd</tt> extension is supported; an empty string otherwise.</p>
<!-- @@@extensionSuffix -->
<!-- $$$extensions[overload1]$$$extensions -->
<h3 class="fn"><a name="extensions"></a>QStringList QCLPlatform::extensions () const</h3>
<p>Returns a list of the extensions supported by this OpenCL platform.</p>
<p>See also <a href="qclplatform.html#hasExtension">hasExtension</a>().</p>
<!-- @@@extensions -->
<!-- $$$hasExtension[overload1]$$$hasExtensionconstchar* -->
<h3 class="fn"><a name="hasExtension"></a>bool QCLPlatform::hasExtension ( const char * <i>name</i> ) const</h3>
<p>Returns true if this platform has an extension called <i>name</i>; false otherwise.</p>
<p>This function is more efficient than checking for <i>name</i> in the return value from <a href="qclplatform.html#extensions">extensions</a>(), if the caller is only interested in a single extension. Use <a href="qclplatform.html#extensions">extensions</a>() to check for several extensions at once.</p>
<p>See also <a href="qclplatform.html#extensions">extensions</a>().</p>
<!-- @@@hasExtension -->
<!-- $$$isEmbeddedProfile[overload1]$$$isEmbeddedProfile -->
<h3 class="fn"><a name="isEmbeddedProfile"></a>bool QCLPlatform::isEmbeddedProfile () const</h3>
<p>Returns true if <a href="qclplatform.html#profile">profile</a>() is <tt>EMBEDDED_PROFILE</tt>; false otherwise.</p>
<p>See also <a href="qclplatform.html#isFullProfile">isFullProfile</a>().</p>
<!-- @@@isEmbeddedProfile -->
<!-- $$$isFullProfile[overload1]$$$isFullProfile -->
<h3 class="fn"><a name="isFullProfile"></a>bool QCLPlatform::isFullProfile () const</h3>
<p>Returns true if <a href="qclplatform.html#profile">profile</a>() is <tt>FULL_PROFILE</tt>; false otherwise.</p>
<p>See also <a href="qclplatform.html#isEmbeddedProfile">isEmbeddedProfile</a>().</p>
<!-- @@@isFullProfile -->
<!-- $$$isNull[overload1]$$$isNull -->
<h3 class="fn"><a name="isNull"></a>bool QCLPlatform::isNull () const</h3>
<p>Returns true if this OpenCL platform identifier is null.</p>
<!-- @@@isNull -->
<!-- $$$name[overload1]$$$name -->
<h3 class="fn"><a name="name"></a>QString QCLPlatform::name () const</h3>
<p>Returns the name of this OpenCL platform.</p>
<!-- @@@name -->
<!-- $$$platformId[overload1]$$$platformId -->
<h3 class="fn"><a name="platformId"></a>cl_platform_id QCLPlatform::platformId () const</h3>
<p>Returns the native OpenCL platform identifier for this object.</p>
<!-- @@@platformId -->
<!-- $$$platforms[overload1]$$$platforms -->
<h3 class="fn"><a name="platforms"></a>QList&lt;QCLPlatform&gt; QCLPlatform::platforms ()<tt> [static]</tt></h3>
<p>Returns a list of all OpenCL platforms that are supported by this host.</p>
<!-- @@@platforms -->
<!-- $$$profile[overload1]$$$profile -->
<h3 class="fn"><a name="profile"></a>QString QCLPlatform::profile () const</h3>
<p>Returns the profile that is implemented by this OpenCL platform, usually <tt>FULL_PROFILE</tt> or <tt>EMBEDDED_PROFILE</tt>.</p>
<p>See also <a href="qclplatform.html#isFullProfile">isFullProfile</a>() and <a href="qclplatform.html#isEmbeddedProfile">isEmbeddedProfile</a>().</p>
<!-- @@@profile -->
<!-- $$$vendor[overload1]$$$vendor -->
<h3 class="fn"><a name="vendor"></a>QString QCLPlatform::vendor () const</h3>
<p>Returns the name of the vendor of this OpenCL platform.</p>
<!-- @@@vendor -->
<!-- $$$version[overload1]$$$version -->
<h3 class="fn"><a name="version"></a>QString QCLPlatform::version () const</h3>
<p>Returns the OpenCL version that is implemented by this OpenCL platform, usually something like <tt>OpenCL 1.0</tt>.</p>
<p>The <a href="qclplatform.html#versionFlags">versionFlags</a>() function parses the version into flag bits that are easier to test than the string returned by version().</p>
<p>See also <a href="qclplatform.html#versionFlags">versionFlags</a>().</p>
<!-- @@@version -->
<!-- $$$versionFlags[overload1]$$$versionFlags -->
<h3 class="fn"><a name="versionFlags"></a><a href="qclplatform.html#VersionFlag-enum">QCLPlatform::VersionFlags</a> QCLPlatform::versionFlags () const</h3>
<p>Returns the OpenCL versions supported by this platform.</p>
<p>See also <a href="qclplatform.html#version">version</a>() and <a href="qcldevice.html#versionFlags">QCLDevice::versionFlags</a>().</p>
<!-- @@@versionFlags -->
<!-- $$$operator!=[overload1]$$$operator!=constQCLPlatform& -->
<h3 class="fn"><a name="operator-not-eq"></a>bool QCLPlatform::operator!= ( const QCLPlatform &amp; <i>other</i> ) const</h3>
<p>Returns true if this OpenCL platform identifier is not the same as <i>other</i>; false otherwise.</p>
<p>See also <a href="qclplatform.html#operator-eq-eq">operator==</a>().</p>
<!-- @@@operator!= -->
<!-- $$$operator==[overload1]$$$operator==constQCLPlatform& -->
<h3 class="fn"><a name="operator-eq-eq"></a>bool QCLPlatform::operator== ( const QCLPlatform &amp; <i>other</i> ) const</h3>
<p>Returns true if this OpenCL platform identifier is the same as <i>other</i>; false otherwise.</p>
<p>See also <a href="qclplatform.html#operator-not-eq">operator!=</a>().</p>
<!-- @@@operator== -->
</div>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td align="left">Copyright &copy; 2010 Nokia Corporation</td>
<td align="right">QtOpenCL Documentation</td>
</tr></table></div></address>  <script src="scripts/functions.js" type="text/javascript"></script>
  <script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-4457116-5']);
  _gaq.push(['_trackPageview']);
  (function() {
  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
  </script>
</body>
</html>
